package com.shanshi.activity.tool;

import android.app.Dialog;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;

import com.shanshi.activity.R;

/**
 * Created by cz on 2017/3/21.
 */

public class CommentDialog extends Dialog{
    private TextView tv_sendreply;
    private ImageView img_close;
    private EditText et_sendreply;
    private Button btn_sendreply;
    public CommentDialog(Context context) {
        //super(context);
        super(context,R.style.Dialog);
        initView(context);
    }

    public CommentDialog(Context context, int themeResId) {
        super(context, themeResId);
        initView(context);
    }

    protected CommentDialog(Context context, boolean cancelable, OnCancelListener cancelListener) {
        super(context, cancelable, cancelListener);
    }
    public void initView(Context context){
        View view= LayoutInflater.from(context).inflate(R.layout.commentdiaog,null);
        img_close= (ImageView) view.findViewById(R.id.img_close);
        et_sendreply= (EditText) view.findViewById(R.id.et_sendreply);
        btn_sendreply= (Button) view.findViewById(R.id.btn_sendreply);
        tv_sendreply= (TextView) view.findViewById(R.id.tv_sendreply);
        super.setContentView(view);
    }
    public EditText getMessageEditText(){
        return et_sendreply;
    }
    public void setOnSendMessage(View.OnClickListener listener){
        btn_sendreply.setOnClickListener(listener);
    }
    public void setDialogclose(View.OnClickListener listener){
        img_close.setOnClickListener(listener);
    }
}

